<%--@elvariable id="element" type="com.infitecs.eyas.quality.model.Element"--%>
<%--@elvariable id="operateField" type="com.infitecs.eyas.power.model.OperateField"--%>
<%--
  Created by IntelliJ IDEA.
  User: chenkaiyu
  Date: 15-4-18
  Time: 上午8:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%@include file="../includes/head.jsp" %>
    <title>${menu.menuName}</title>
</head>
<body class="page-header-fixed page-quick-sidebar-over-content">
<%@include file="../includes/top.jsp" %>
<div class="page-container">
<%@include file="../includes/sidebar.jsp" %>
<div class="page-content-wrapper">
<div class="page-content">
<%@include file="../includes/current.jsp" %>
<div class="row">
    <div class="col-md-12">
        <div class="portlet box">
            <div class="portlet-body form">
                <%--<form action="#" class="horizontal-form">--%>
                <div class="form-body">
                    <div class="row">
                        <div class="col-md-4">
                            <div class="form-group">
                                <label class="aTypeStyle control-label col-md-3"
                                       style=" padding-left: 0px; padding-right: 0px;">收到基碳Car</label>

                                <div class="col-md-9">
                                    <input type="text" class="form-control input-inline"
                                           name="car" id="car" value="${element==null?"":element.carShow}">
														<span class="help-inline">
														% </span>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <label class="aTypeStyle control-label col-md-3"
                                       style=" padding-left: 0px; padding-right: 0px;">收到基氢Har</label>

                                <div class="col-md-9">
                                    <input type="text" class="form-control input-inline"
                                           name="har" id="har" value="${element==null?"":element.harShow}">
														<span class="help-inline">
														% </span>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <label class="aTypeStyle control-label col-md-3"
                                       style=" padding-left: 0px; padding-right: 0px;">收到基氧Oar</label>

                                <div class="col-md-9">
                                    <input type="text" class="form-control input-inline"
                                           name="oar" id="oar" value="${element==null?"":element.oarShow}">
														<span class="help-inline">
														% </span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-body">
                    <div class="row">
                        <div class="col-md-4">
                            <div class="form-group">
                                <label class="aTypeStyle control-label col-md-3"
                                       style="padding-left: 0px; padding-right: 0px;">收到基氮Nar</label>

                                <div class="col-md-9">
                                    <input type="text" class="form-control input-inline"
                                           id="nar" name="nar" value="${element==null?"":element.narShow}">
														<span class="help-inline">
														% </span>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <label class="aTypeStyle control-label col-md-3"
                                       style=" padding-left: 0px; padding-right: 0px;">收到基硫Sar</label>

                                <div class="col-md-9">
                                    <input type="text" class="form-control input-inline"
                                           id="sar" name="sar"  value="${element==null?"":element.sarShow}">
														<span class="help-inline">
														% </span>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <label class="control-label col-md-3"
                                       style="padding-left: 0px; padding-right: 0px;">合<span
                                        style="margin-left: 25px; margin-right: 25px;"></span>计</label>

                                <div class="col-md-9">
                                    <input type="text" class="form-control input-inline"
                                           id="sum" name="sum" readonly  value="${element==null?"":element.sumShow}">
														<span class="help-inline">
														    %
	                                                    </span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-body">
                    <div class="row">
                        <div class="col-md-5" style="margin-right: -8px;">
                            <div class="form-group">
                                <label class="<c:if test="${element!=null&&operateField.qnetArState=='1'}">aTypeStyle </c:if> control-label col-md-4" id="qnetArLabel"
                                style="padding-left: 0px; padding-right: 0px;">收到基低位发热量Qnet.ar</label>

                                <div class="col-md-7">
                                    <input type="text" class="form-control input-inline"
                                           id="qnetAr" name="qnetAr"  value="${element==null?"":element.qnetArShow}"
                                      <c:if test="${element==null||operateField.qnetArState=='0'}">
                                          readonly =readonly
                                      </c:if>
                                            >
                                            <span class="help-inline">
                                            KJ/kg</span>
                                    <input type="checkbox" id="qnetArState" name="qnetArState"
                                    <c:if test="${element!=null&&operateField.qnetArState=='1'}">
                                         checked
                                     </c:if>
                                     >

                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <div class="col-md-9">
                                    <input type="text" class="form-control input-inline"
                                           id="qnetArOther" name="qnetArOther"  value="${element==null?"":element.qnetArOtherShow}"
                                    <c:if test="${element==null||operateField.qnetArOtherState=='0'}">
                                     readonly =readonly
                                    </c:if>
                                    >
                                    <span class="help-inline" >kcal/kg</span>
                                    <input type="checkbox" id="qnetArOtherState" name="qnetArOtherState"
                                    <c:if test="${element!=null&&operateField.qnetArOtherState=='1'}">
                                         checked
                                     </c:if>
                                     >
                                </div>
                                <div class="col-md-3">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-body">
                    <div class="row">
                        <div class="col-md-5" style="margin-right: -8px;">
                            <div class="form-group">
                                <label class="<c:if test="${element!=null&&operateField.qgrArState=='1'}">aTypeStyle </c:if> control-label col-md-4"
                                       style="padding-left: 0px; padding-right: 0px;">收到基高位发热量Qgr.ar</label>

                                <div class="col-md-7">
                                    <input type="text" class="form-control input-inline" id="qgrAr"
                                           name="qgrAr"  value="${element==null?"":element.qgrArShow}"
                                    <c:if test="${element==null||operateField.qgrArState=='0'}">
                                        readonly =readonly
                                    </c:if>
                                    >
                                    <span class="help-inline">
                                    KJ/kg</span>
                                    <input type="checkbox" id="qgrArState" name="qgrArState"
                                    <c:if test="${element!=null&&operateField.qgrArState=='1'}">
                                         checked
                                     </c:if>
                                     >
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <div class="col-md-9">
                                    <input type="text" class="form-control input-inline" id="qgrArOther"
                                           name="qgrArOther"  value="${element==null?"":element.qgrArOtherShow}"
                                    <c:if test="${element==null||operateField.qgrArOtherState=='0'}">
                                        readonly =readonly
                                    </c:if>
                                    ><span class="help-inline">
														kcal/kg</span>
                                    <input type="checkbox" id="qgrArOtherState" name="qgrArOtherState"
                                    <c:if test="${element!=null&&operateField.qgrArOtherState=='1'}">
                                         checked
                                     </c:if>
                                     >
                                </div>
                                <div class="col-md-3">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <div class="form-body">
                        <div class="row">
                            <div class="col-md-5">
                             </div>
                             <div class="col-md-7">
                                 <button type="button" class="btn green" id="save" onclick="ElementPage.elementSave()">确定</button>
                                 <button type="button" class="btn green" id="nextPage" onclick="ElementPage.elementNext()">下一页</button>
                             </div>
                        </div>
                    </div>
                </div>
                <%--</form>--%>
            </div>
        </div>
    </div>
</div>
</div>
</div>
</div>
<input type="hidden" id="caseId" value="${caseId}" name="caseId">
<input type="hidden" id="addFlag" value="${element==null?"add":"edit"}" name="addFlag">
<%@include file="../includes/footer.jsp" %>
<%@include file="../includes/bottomscript.jsp" %>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/DataTables/media/js/jquery.dataTables.min.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/ztree_v3/js/jquery.ztree.core-3.5.min.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/ztree_v3/js/jquery.ztree.excheck-3.5.min.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/quality/element1.js"/>"></script>
</body>
<script>
    $(document).ready(function () {
        var caseId = $("#caseId").val();
        var step='<%=request.getAttribute("step")==null?"":request.getAttribute("step")%>'
        if (caseId == ""||step!="") {
            var obj=getUrlByStep(step)
            toast.error(obj.message);
            setTimeout(function () {
                window.location.href = obj.url;
            }, 1200);
        }
        ElementPage.init();
    })
</script>

<script type="text/javascript">
    $(function () {
        <%
        String message = (String) request.getAttribute("message");
        if(message!=null&&!"".equals(message)){
        if(message.equals("success")){
        %>
        toast.success("操作成功");
        <%
        }else{
        %>
        toast.error("<%=request.getAttribute("message")%>");
        <%
         }
            }
       %>
    });
</script>
</html>